//
// Created by neo on 2025/3/21.
//

#ifndef NEWEFFECTENGINE_H
#define NEWEFFECTENGINE_H
#include <map>

#include "gpu/VkGPUBuffer.h"
#include "gpu/VkGPUContext.h"
#include "gpu/compute_graph/ComputeGraph.h"

class ComputeGraphEngine {
    std::shared_ptr<VkGPUContext> gpuCtx = nullptr;

    std::shared_ptr<ComputeGraph> computeGraph = nullptr;
    std::map<std::string, std::shared_ptr<IComputeGraphNode> > nodes;
    std::map<std::string, std::shared_ptr<VkGPUBuffer> > buffers;

public:
    ComputeGraphEngine() = default;

    ~ComputeGraphEngine() = default;

    bool Initialize();

    void LoadComputeGraph(std::string filePath);

    void ConstructComputeGraph();

    bool ExecuteComputeGraph() const;

    void DestroyComputeGraph() const;
};


#endif //NEWEFFECTENGINE_H
